Skip to content

[seekdb][vector] Fix HGRAPH snapshot key prefix#952

Merged
hnwyllmm merged 1 commit into
masterfrom
issue/2026062500116993052
Jul 1, 2026
Merged

[seekdb][vector] Fix HGRAPH snapshot key prefix#952
hnwyllmm merged 1 commit into
masterfrom
issue/2026062500116993052

Conversation

@hnwyllmm

@hnwyllmm hnwyllmm commented Jun 30, 2026

Copy link
Copy Markdown
Member

Task Description

Fix a Vsag deserialize failure (BufferStreamReader: The file size is smaller than the memory you want to read) that occurs when OceanBase reloads a serialized HGRAPH snapshot index from the snapshot data table. The failure happens because the binary stream reconstructed from snapshot rows can be incomplete or mixed, causing Vsag to attempt reading more bytes than are available.

Solution Description

The root cause was that the row key for normal DDL HGRAPH snapshot data was generated without the snapshot version (tabletId_hgraph_data_partNNNNN), while other vector snapshot paths (direct-load, async refresh) correctly used tabletId_snapshotVersion_hgraph_data_partNNNNN. This missing version weakened version isolation.

The fix modifies the normal DDL HGRAPH snapshot key generation to include the snapshot_version_, making it tabletId_snapshotVersion_hgraph_data_partNNNNN. This aligns it with the existing direct-load and async refresh key formats and restores the invariant shared by write, adapter prefix management, and reload operations.

Passed Regressions

  • git diff --check
  • ob-make -j4 ob_storage

Upgrade Compatibility

This change only affects newly written HGRAPH snapshot-data row keys generated by normal DDL. It aligns the normal DDL key format with the existing formats used by direct-load and async refresh.

Other Information

  • Local commit: ca47db833ea fix vector hgraph snapshot key prefix.
  • Untracked local file 2 is not included in this MR.
  • Related issue: DIMA-2026062500116993052.

Release Note

Fixed a Vsag deserialize failure during HGRAPH snapshot index reload by correcting the snapshot data row key prefix for normal DDL operations to include the snapshot version, ensuring proper version isolation.

@hnwyllmm

Copy link
Copy Markdown
Member Author

The mapping Dima issue is [[seekdb][ddltest_duomo][errcode=-7604] [Vsag](Log=BufferStreamReader: The file size is smaller than the memory you want to read](

@hnwyllmm hnwyllmm force-pushed the issue/2026062500116993052 branch from f65d279 to 23d4ed5 Compare July 1, 2026 02:42
@hnwyllmm hnwyllmm merged commit 1e6936f into oceanbase:master Jul 1, 2026
4 checks passed
@hnwyllmm hnwyllmm deleted the issue/2026062500116993052 branch July 1, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants